#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int n;
    char c;
    cin >> n >> c;
    int x = sqrt((n + 1) / 2);
    for (int i = x; i >= 1; i--) {
        for (int j = 0; j < x - i; j++) cout << " ";
        for (int j = 0; j < 2 * i - 1; j++) cout << c;
        cout << endl;
    }
    for (int i = 2; i <= x; i++) {
        for (int j = 0; j < x - i; j++) cout << " ";
        for (int j = 0; j < 2 * i - 1; j++) cout << c;
        cout << endl;
    }
    cout << n - (2 * x * x - 1);
    return 0;
}